

// path 模块提供了用于处理文件和目录的路径的实用工具

let path = require('node:path');
console.log(__dirname);
console.log(__filename);

let str = path.join(__dirname, './yesok/demo', 'index.html');
let str2 = path.join(__dirname, '../yesok/demo', 'index.html');
let str3 = path.join(__dirname, '/yesok/demo', 'index.html');
console.log(str, str2, str3);
